import request from '@/utils/request'

export default {
  //某个视频下的所有功能
    list(vid) {
        return request({
            url: `/comment/video/${id}`,
            method: 'get'
        })
    },
    //发表评论
    add(pojo) {
        return request({
            url: '/comment',
            method: 'post',
            data: pojo
        })
    },

    getById(id) {
        return request({
            url: `/comment/${id}`,
            method: 'get'
        })
    },
    // 更新操作
    update(pojo) {
        return request({
            url: `/comment`,
            method: 'put',
            data: pojo
        })
    },

    //删除
    deleteById(id) {
        return request({
            url: `/comment/${id}`,
            method: 'delete'
        })
    }
}